package com.dingup.provider.init;


import com.dingup.provider.service.sys.LoadUserPermissionService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by wancheng on 2018/8/10.
 */
@Component
public class OrganizationalInitController implements CommandLineRunner {

    private static Logger logger = LoggerFactory.getLogger(OrganizationalInitController.class);

    @Autowired
    LoadUserPermissionService loadUserPermissionService;
    @Override
    public void run(String... strings) throws Exception {
        loadUserPermissionService.loadOrganizationalStructure();
        logger.info("项目启动,初始化加载组织架构缓存。。。。");
    }
}
